package com.scu.service;

import com.scu.dao.ModeratorDao;
import com.scu.pojo.Moderator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ModeratorServiceImpl implements ModeratorService{
    @Autowired
    private ModeratorDao moderatorDao;

    //查看版主
    @Override
    public List<Moderator> getModeratorList(Moderator moderator){
        return moderatorDao.getModeratorList(moderator);
    }

    //添加版主
    @Override
    public int addModerator(Moderator moderator){
        return moderatorDao.addModerator(moderator);
    }

    //删除版主
    @Override
    public int removeModerator(Moderator moderator){
        return moderatorDao.removeModerator(moderator);
    }

    @Override
    public int getModeratorNum() {
        return moderatorDao.getModeratorNum();
    }
}

